﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TMDT_Nhom1A.BUS;

namespace TMDT_Nhom1A.Administrator
{
    public partial class DanhSachSanPham_Admin : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.QueryString["ParentCatalogueID"] != null)
                {
                    int ParentCatalogue = int.Parse(Request.QueryString["ParentCatalogueID"]);
                    dllistproducts.DataSource = ElectricDevice_BUS.ListProductByParentCatalogue(ParentCatalogue);
                    dllistproducts.DataBind();
                }
                if (Request.QueryString["ChildCatalogueID"] != null)
                {
                    int ChildCatalogue = int.Parse(Request.QueryString["ChildCatalogueID"]);
                    dllistproducts.DataSource = ElectricDevice_BUS.ListProductByChildCatalogue(ChildCatalogue);
                    dllistproducts.DataBind();
                }
            }
        }
    }
}
